import axios from '@/utils/request'

export function getPermissionList() {
  return axios({
    url: '/sys/permission'
  })
}

export function getAddPermission(data) {
  return axios({
    url: '/sys/permission',
    method: 'post',
    data
  })
}

export function getEditPermission(data) {
  return axios({
    url: `/sys/permission/${data.id}`,
    method: 'put',
    data
  })
}

export function getDetailPermission(id) {
  return axios({
    url: `/sys/permission/${id}`
  })
}

export function delPermission(id) {
  return axios({
    url: `/sys/permission/${id}`,
    method: 'delete'
  })
}

